import request from '@/utils/request'


export function AddProject(data) {
  return request({
    url: '/api/project/project/AddProject',
    method: 'post',
    data
  })
}

export function GetProject(id) {
  return request({
    url: '/api/project/project/GetProject',
    method: 'get',
    params: {
      id
    }
  })
}

export function GetProjects(pageIndex, pageSize, name) {
  return request({
    url: '/api/project/project/GetProjects',
    method: 'get',
    params: {
      pageIndex, pageSize, name
    }
  })
}
export function GetProjectTree() {
  return request({
    url: '/api/project/project/GetProjectTree',
    method: 'get'
  })
}
export function AddProjectStep(data) {
  return request({
    url: '/api/project/project/AddProjectStep',
    method: 'post',
    data
  })
}

export function DeleteSurveyOpUser(id) {
  return request({
    url: '/api/project/project/DeleteSurveyOpUser',
    method: 'get',
    params: {
      id
    }
  })
}
export function AddSurveyOpUser(data) {
  return request({
    url: '/api/project/project/AddSurveyOpUser',
    method: 'post',
    data
  })
}
export function UpdateSurveyOpUser(data) {
  return request({
    url: '/api/project/project/UpdateSurveyOpUser',
    method: 'post',
    data
  })
}
export function HasSurveyOp(userId, prjId) {
  return request({
    url: '/api/project/project/HasSurveyOp',
    method: 'get',
    params: {
      userId, prjId
    }
  })
}
export function GetProjectSteps(prjId) {
  return request({
    url: '/api/project/project/GetProjectSteps',
    method: 'get',
    params: {
      prjId
    }
  })
}
